package com.wangyadong.hobby.schedule.jobtask.jvm;

/**
 * <p>
 *
 * @author <714037465@qq.com>
 * @since 2018/11/2315:09
 **/
public class StaticDispatch {


    static abstract class Human {

    }

    static class Man extends Human {

    }

    static class Women extends Human {

    }

    public void SayHello(Human guy) {
        System.out.println("hello guy");
    }

    public void SayHello(Man man) {
        System.out.println("hello man");
    }

    public void SayHello(Women women) {
        System.out.println("hello women");
    }

    public static void main(String[] args) {
        Human man = new Man();
        Human women = new Women();
        StaticDispatch staticDispatch = new StaticDispatch();
        staticDispatch.SayHello(man);
        staticDispatch.SayHello(women);
    }

}
